﻿using Developer.Core.FrameWork.MiddlePlatformService.Options;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Developer.Core.FrameWork.MiddlePlatformService.Service
{
    /// <summary>
    /// 中台服务http请求接口
    /// </summary>
    public interface IMiddlePlatformService
    {
        /// <summary>
        /// Get请求
        /// </summary>
        /// <param name="middleUrl"></param>
        /// <param name="middleParam"></param>
        /// <returns></returns>
        Task<MiddlePlatformResult> Get(string middleUrl, IDictionary<string, object> middleParam);

        /// <summary>
        /// Post请求
        /// </summary>
        /// <param name="middleUrl"></param>
        /// <param name="middleParam"></param>
        /// <returns></returns>
        Task<MiddlePlatformResult> Post(string middleUrl, IDictionary<string, object> middleParam);

        /// <summary>
        /// Post请求，动态参数
        /// </summary>
        /// <param name="middleUrl"></param>
        /// <param name="middleParam"></param>
        /// <returns></returns>
        Task<MiddlePlatformResult> PostDynamic(string middleUrl, dynamic middleParam);

        /// <summary>
        /// Post请求
        /// </summary>
        /// <param name="middleUrl"></param>
        /// <param name="middleParams"></param>
        /// <returns></returns>
        Task<MiddlePlatformResult> Post(string middleUrl, IList<IDictionary<string, object>> middleParams);

        /// <summary>
        /// Put请求
        /// </summary>
        /// <param name="middleUrl"></param>
        /// <param name="middleParam"></param>
        /// <returns></returns>
        Task<MiddlePlatformResult> Put(string middleUrl, IDictionary<string, object> middleParam);

        /// <summary>
        /// Put请求，动态参数
        /// </summary>
        /// <param name="middleUrl"></param>
        /// <param name="middleParam"></param>
        /// <returns></returns>
        Task<MiddlePlatformResult> PutDynamic(string middleUrl, dynamic middleParam);

        /// <summary>
        /// Put请求
        /// </summary>
        /// <param name="middleUrl"></param>
        /// <param name="middleParam"></param>
        /// <returns></returns>
        Task<MiddlePlatformResult> Put(string middleUrl, IList<IDictionary<string, object>> middleParam);

        /// <summary>
        /// Delete请求
        /// </summary>
        /// <param name="middleUrl"></param>
        /// <param name="middleParam"></param>
        /// <returns></returns>
        Task<MiddlePlatformResult> Delete(string middleUrl, IDictionary<string, object> middleParam);
    }
}
